﻿
using System;

namespace MockingBird.Simulator.Framework.Configuration
{
    public class HandlerRegistrationEntry
    {
        public string HandlerName { get; set; }
        public string FullTypeName { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;

            if (this.GetType() != obj.GetType()) return false;

            // safe because of the GetType check
            HandlerRegistrationEntry incomingEntry = (HandlerRegistrationEntry)obj;

            // use this pattern to compare value members
            if (!HandlerName.Equals(incomingEntry.HandlerName)) return false;
            if (!FullTypeName.Equals(incomingEntry.FullTypeName)) return false;

            return true;
        }

    }
}
